<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>Canvas3D倒计时爆炸</title>
    <style>
        body,
        html {
            width: 100%;
            height: 100%;
            margin: 0;
            padding: 0;
            overflow: hidden;
            background-color: #333;
        }

        canvas,
        #text-wrapper {
            position: absolute;
        }

        #text-wrapper {
            z-index: 10;
        }

        #text-wrapper span {
            color: transparent;
            text-align: center;
            font-weight: bold;
            font-size: 40px;
            -webkit-text-fill-color: transparent;
            -webkit-background-clip: text;
            background-size: cover;
        }

        #text-1 {
            background: url('hudun/wave-1.png') no-repeat center center;
        }

        #text-2 {
            background: url('hudun/wave-2.png') no-repeat center center;
            position: relative;
        }
    </style>
</head>

<body>
    <div id="text-wrapper">
        <span id="text-1">当前网络时间</span>
        <span id="text-2">当前网络时间</span>
    </div>
    <canvas id="canvas"></canvas>
    <script src='../support/dat.gui.min.js'></script>
    <script src="other/countdown.js"></script>
    <script>
        var tw = document.getElementById('text-wrapper');
        var t2 = document.getElementById('text-2');
        window.onload = function () {
            t2.style.left = -tw.offsetWidth / 2 + 'px';
            rePage();
        };
        window.onresize = function () {
            rePage();
        };
        function rePage() {
            height = canvas.height = document.body.offsetHeight;
            width = canvas.width = document.body.offsetWidth;
            vanishPointY = height / 2;
            vanishPointX = width / 2;
            tw.style.left = (width / 2 - tw.offsetWidth / 2) + 'px';
            tw.style.top = (height / 2 - tw.offsetHeight * 3) + 'px';
        }
    </script>
</body>

</html>